<#include "/public/macro.html">
<div class="uk-layui-form">
	<form class="layui-form" action="/apps/contacts/relate/save.html" data-toggle="ajax-form" method="post" data-inner="#ukefu_contacts_relist" >
		<input type="hidden" name="contactsid" value="${contactsid!''}">
		<div class="layui-collapse">
			<div class="layui-colla-item">
				<h2 class="layui-colla-title">基本信息</h2>
				<div class="layui-colla-content layui-show">
					<div class="layui-form-item">
						<div class="layui-inline">
							<label class="layui-form-label" id="relation">关系：</label>
							<div class="layui-input-inline" >
								<select name="relation">
									<#list uKeFuDic['com.dic.contacts.relation'] as macroSysDic>
									<option value="${macroSysDic.id!''}" >${macroSysDic.name!''}</option>
									</#list>
								</select>
							</div>
						</div>
						<div class="layui-inline">
							<font color="red">*</font>
						</div>
						<div class="layui-inline uckefu-inline">
							<label class="layui-form-label" id="relation">搜索关键词：</label>
							<div class="layui-input-inline" >
								 <input type="text" name="q" id="q"  placeholder="搜索关键词" autocomplete="off" class="layui-input">
							</div>
						</div>
						<div class="layui-inline">
							<a class="layui-btn layui-btn-sm green" href="javascript:void(0);" onclick="loadURL('/apps/contacts/contactslist.html?contactsid=${contactsid!''}&q='+$('#q').val(),'#contactlist');" >搜索</a>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="row" style="height: 438px;"  id="contactlist" >
			<#include "/apps/business/contacts/include/contactlist.html">
		</div>
		<div class="layui-form-button">
			<div class="layui-button-block">
				<button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
				<button type="reset" class="layui-btn layui-btn-primary">重置</button>
			</div>
		</div>
	</form>
</div>
<script>
	layui.use('form', function() {
		var form = layui.form;
		form.render(); //更新全部
	});
	layui.use('element', function(){
		var element = layui.element;
	});
	layui.use('laydate', function() {
		var laydate = layui.laydate;

		var date = {
			min : '1950-01-01 00:00:00',
			istoday : false
		};

		laydate.render({ 
			elem: '#getdate' ,
			format:"yyyy-MM-dd",
			max:0
		});

		laydate.render({ 
			elem: '#cbirthday',
			format:"yyyy-MM-dd" ,
			max:0
		});
	});
</script>